import 'package:flutter/services.dart';

import '../index.dart';

class CommonText extends BaseUpDownWidget {
  String? content;
  TextStyle? style;
  final GestureTapCallback? onTap;

  CommonText(
      {Key? key,
      required title,
      this.content,
      this.onTap,
      this.style,
      isHideDivide = false})
      : super(
            key: key,
            title: title,
            isHideDivide: isHideDivide,
            isRequired: false);

  @override
  Widget build(BuildContext context) {
    setDownWidget(
      Text(
        content ?? "",
        textAlign: TextAlign.left,
        style: Theme.of(context).textTheme.titleMedium?.merge(style),
      ),
    );
    return InkWell(
      child: super.build(context),
      onTap: onTap,
    );
  }
}
